<template>
  <div id="app">
    <h3>路由Demo</h3>
    <hr>
    <nav>
      <router-link exact to="/">首页</router-link>|
      <router-link to="/newsList">新闻列表页</router-link>|
      <router-link to="/goodsList">商品列表页</router-link>|
      <router-link to="/my">个人中心</router-link>    </nav>
    <router-view/>
  </div>
</template>
<script>
export default {
  name: "App"
}
</script>
<style lang="less" scoped>
#app {
  text-align: center;

  a {
    padding: 5px;
    color: skyblue;
  }

  //a.router-link-exact-active {
  //    color:red;
  //}
  a.active {
    color: red;
    font-weight: bold;
  }

  //a.router-link-active{
  //  color:red;
  //}
}
</style>
